import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class Demo5 {
    public static void main(String[] args) throws IOException {
        try (InputStream stream = new FileInputStream("./text.txt")) {
            while (true){
                int b=stream.read();
                if(b==-1){
                    break;
                }
                System.out.printf("0x%x\n",b);
            }
          }catch (IOException e){
            e.printStackTrace();
        }

    }
}
